<?php
/**
 *
 * @author Strawberry🍓
 * @date 2021-05-21 4:08 下午
 *
 */

namespace app\common\model\tang;


use app\common\impl\Comm;
use app\common\model\CommonBaseModel;
use Jrk\Tree;
use think\facade\Db;

class CostSectionPay extends CommonBaseModel implements Comm
{


    public function getAdminPageData($param = [], $order = 'id desc',$where=[])
    {
        $model = self::where($where);
        $data = $model->order($order)->where($where)->page(PAGE)->limit(LIMIT)->select()->toArray();
        $count = count($data);
        return parent::ajaxResult($data,$count);

    }

    public function getCreateTimeAttr($time)
    {
        return date("Y-m-d H:i",$time);
    }

    public function getAllAmountAttr($all_amount)
    {
        return $all_amount/100;
    }
    public function getAmountAttr($amount)
    {
        return $amount/100;
    }
    public function getBalanceAmountAttr($balance_amount)
    {
        return $balance_amount/100;
    }
    public function delById($id)
    {
        // TODO: Implement delById() method.
    }

    public function doAll($data)
    {
        // TODO: Implement doAll() method.
        return parent::doAllData($data);
    }
}